home *** CD-ROM | disk | FTP | other *** search
Unknown | 1999-09-15 | 10.8 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 40 ac 01 2f 2f 3d 3d 3d |........|@..//===|
|00000010| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000020| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000030| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000050| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0d 0a 2f 2f 20 55 |========|==..// U|
|00000060| 64 70 53 65 72 76 65 72 | 51 75 65 72 79 0d 0a 2f |dpServer|Query../|
|00000070| 2f 0d 0a 2f 2f 20 56 65 | 72 73 69 6f 6e 3a 20 31 |/..// Ve|rsion: 1|
|00000080| 2e 35 0d 0a 2f 2f 0d 0a | 2f 2f 20 54 68 69 73 20 |.5..//..|// This |
|00000090| 71 75 65 72 79 20 73 65 | 72 76 65 72 20 69 73 20 |query se|rver is |
|000000a0| 63 6f 6d 70 6c 69 61 6e | 74 20 77 69 74 68 20 74 |complian|t with t|
|000000b0| 68 65 20 47 61 6d 65 53 | 70 79 20 55 70 6c 69 6e |he GameS|py Uplin|
|000000c0| 6b 20 53 70 65 63 69 66 | 69 63 61 74 69 6f 6e 2e |k Specif|ication.|
|000000d0| 0d 0a 2f 2f 20 54 68 65 | 20 73 70 65 63 69 66 69 |..// The| specifi|
|000000e0| 63 61 74 69 6f 6e 20 69 | 73 20 61 76 61 69 6c 61 |cation i|s availa|
|000000f0| 62 6c 65 20 61 74 20 68 | 74 74 70 3a 2f 2f 77 77 |ble at h|ttp://ww|
|00000100| 77 2e 67 61 6d 65 73 70 | 79 2e 63 6f 6d 2f 64 65 |w.gamesp|y.com/de|
|00000110| 76 65 6c 6f 70 65 72 0d | 0a 2f 2f 20 61 6e 64 20 |veloper.|.// and |
|00000120| 6d 69 67 68 74 20 62 65 | 20 6f 66 20 75 73 65 20 |might be| of use |
|00000130| 74 6f 20 70 72 6f 67 61 | 6d 6d 65 72 73 20 77 68 |to proga|mmers wh|
|00000140| 6f 20 61 72 65 20 77 72 | 69 74 69 6e 67 20 6f 72 |o are wr|iting or|
|00000150| 20 6d 61 69 6e 74 61 69 | 6e 69 6e 67 0d 0a 2f 2f | maintai|ning..//|
|00000160| 20 74 68 65 69 72 20 6f | 77 6e 20 73 74 61 74 20 | their o|wn stat |
|00000170| 67 61 74 68 65 72 69 6e | 67 2f 67 61 6d 65 20 71 |gatherin|g/game q|
|00000180| 75 65 72 79 69 6e 67 20 | 73 6f 66 74 77 61 72 65 |uerying |software|
|00000190| 2e 0d 0a 2f 2f 0d 0a 2f | 2f 20 4e 6f 74 65 3a 20 |...//../|/ Note: |
|000001a0| 43 75 72 72 65 6e 74 6c | 79 2c 20 53 65 6e 64 54 |Currentl|y, SendT|
|000001b0| 65 78 74 20 72 65 74 75 | 72 6e 73 20 66 61 6c 73 |ext retu|rns fals|
|000001c0| 65 20 69 66 20 73 75 63 | 63 65 73 73 66 75 6c 2e |e if suc|cessful.|
|000001d0| 0d 0a 2f 2f 0d 0a 2f 2f | 20 46 75 6c 6c 20 64 6f |..//..//| Full do|
|000001e0| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 6f 6e 20 74 |cumentat|ion on t|
|000001f0| 68 69 73 20 63 6c 61 73 | 73 20 69 73 20 61 76 61 |his clas|s is ava|
|00000200| 69 6c 61 62 6c 65 20 61 | 74 20 68 74 74 70 3a 2f |ilable a|t http:/|
|00000210| 2f 75 6e 72 65 61 6c 2e | 65 70 69 63 67 61 6d 65 |/unreal.|epicgame|
|00000220| 73 2e 63 6f 6d 2f 0d 0a | 2f 2f 0d 0a 2f 2f 3d 3d |s.com/..|//..//==|
|00000230| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000240| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000250| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000260| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000270| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0d 0a 63 6c 61 |========|===..cla|
|00000280| 73 73 20 55 64 70 53 65 | 72 76 65 72 51 75 65 72 |ss UdpSe|rverQuer|
|00000290| 79 20 65 78 74 65 6e 64 | 73 20 55 64 70 4c 69 6e |y extend|s UdpLin|
|000002a0| 6b 20 63 6f 6e 66 69 67 | 3b 0d 0a 0d 0a 2f 2f 20 |k config|;....// |
|000002b0| 47 61 6d 65 20 53 65 72 | 76 65 72 20 43 6f 6e 66 |Game Ser|ver Conf|
|000002c0| 69 67 2e 0d 0a 76 61 72 | 28 29 20 6e 61 6d 65 09 |ig...var|() name.|
|000002d0| 09 09 09 09 51 75 65 72 | 79 4e 61 6d 65 3b 09 09 |....Quer|yName;..|
|000002e0| 09 2f 2f 20 4e 61 6d 65 | 20 74 6f 20 73 65 74 20 |.// Name| to set |
|000002f0| 74 68 69 73 20 6f 62 6a | 65 63 74 27 73 20 54 61 |this obj|ect's Ta|
|00000300| 67 20 74 6f 2e 0d 0a 76 | 61 72 20 69 6e 74 09 09 |g to...v|ar int..|
|00000310| 09 09 09 20 20 20 20 43 | 75 72 72 65 6e 74 51 75 |... C|urrentQu|
|00000320| 65 72 79 4e 75 6d 3b 09 | 2f 2f 20 51 75 65 72 79 |eryNum;.|// Query|
|00000330| 20 49 44 20 4e 75 6d 62 | 65 72 2e 0d 0a 76 61 72 | ID Numb|er...var|
|00000340| 20 67 6c 6f 62 61 6c 63 | 6f 6e 66 69 67 20 73 74 | globalc|onfig st|
|00000350| 72 69 6e 67 09 09 47 61 | 6d 65 4e 61 6d 65 3b 0d |ring..Ga|meName;.|
|00000360| 0a 0d 0a 2f 2f 20 49 6e | 69 74 69 61 6c 69 7a 65 |...// In|itialize|
|00000370| 2e 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 50 72 65 42 |...funct|ion PreB|
|00000380| 65 67 69 6e 50 6c 61 79 | 28 29 0d 0a 7b 0d 0a 09 |eginPlay|()..{...|
|00000390| 6c 6f 63 61 6c 20 69 6e | 74 20 62 6f 75 6e 64 70 |local in|t boundp|
|000003a0| 6f 72 74 3b 0d 0a 0d 0a | 09 2f 2f 20 53 65 74 20 |ort;....|.// Set |
|000003b0| 74 68 65 20 54 61 67 0d | 0a 09 54 61 67 20 3d 20 |the Tag.|..Tag = |
|000003c0| 51 75 65 72 79 4e 61 6d | 65 3b 0d 0a 0d 0a 09 2f |QueryNam|e;...../|
|000003d0| 2f 20 42 69 6e 64 20 74 | 68 65 20 6c 69 73 74 65 |/ Bind t|he liste|
|000003e0| 6e 20 73 6f 63 6b 65 74 | 0d 0a 09 62 6f 75 6e 64 |n socket|...bound|
|000003f0| 70 6f 72 74 20 3d 20 42 | 69 6e 64 50 6f 72 74 28 |port = B|indPort(|
|00000400| 4c 65 76 65 6c 2e 47 61 | 6d 65 2e 47 65 74 53 65 |Level.Ga|me.GetSe|
|00000410| 72 76 65 72 50 6f 72 74 | 28 29 2c 20 74 72 75 65 |rverPort|(), true|
|00000420| 29 3b 0d 0a 09 69 66 28 | 20 62 6f 75 6e 64 70 6f |);...if(| boundpo|
|00000430| 72 74 20 3d 3d 20 30 20 | 29 0d 0a 09 7b 0d 0a 09 |rt == 0 |)...{...|
|00000440| 09 4c 6f 67 28 22 55 64 | 70 53 65 72 76 65 72 51 |.Log("Ud|pServerQ|
|00000450| 75 65 72 79 3a 20 50 6f | 72 74 20 66 61 69 6c 65 |uery: Po|rt faile|
|00000460| 64 20 74 6f 20 62 69 6e | 64 2e 22 29 3b 0d 0a 09 |d to bin|d.");...|
|00000470| 09 72 65 74 75 72 6e 3b | 0d 0a 09 7d 0d 0a 09 4c |.return;|...}...L|
|00000480| 6f 67 28 22 55 64 70 53 | 65 72 76 65 72 51 75 65 |og("UdpS|erverQue|
|00000490| 72 79 3a 20 50 6f 72 74 | 20 22 24 62 6f 75 6e 64 |ry: Port| "$bound|
|000004a0| 70 6f 72 74 24 22 20 73 | 75 63 63 65 73 73 66 75 |port$" s|uccessfu|
|000004b0| 6c 6c 79 20 62 6f 75 6e | 64 2e 22 29 3b 0d 0a 7d |lly boun|d.");..}|
|000004c0| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 50 6f 73 |....func|tion Pos|
|000004d0| 74 42 65 67 69 6e 50 6c | 61 79 28 29 0d 0a 7b 0d |tBeginPl|ay()..{.|
|000004e0| 0a 09 6c 6f 63 61 6c 20 | 55 64 70 42 65 61 63 6f |..local |UdpBeaco|
|000004f0| 6e 09 42 65 61 63 6f 6e | 3b 0d 0a 0d 0a 09 66 6f |n.Beacon|;.....fo|
|00000500| 72 65 61 63 68 20 41 6c | 6c 41 63 74 6f 72 73 28 |reach Al|lActors(|
|00000510| 63 6c 61 73 73 27 55 64 | 70 42 65 61 63 6f 6e 27 |class'Ud|pBeacon'|
|00000520| 2c 20 42 65 61 63 6f 6e | 29 0d 0a 09 7b 0d 0a 09 |, Beacon|)...{...|
|00000530| 09 42 65 61 63 6f 6e 2e | 55 64 70 53 65 72 76 65 |.Beacon.|UdpServe|
|00000540| 72 51 75 65 72 79 50 6f | 72 74 20 3d 20 50 6f 72 |rQueryPo|rt = Por|
|00000550| 74 3b 0d 0a 09 7d 0d 0a | 09 53 75 70 65 72 2e 50 |t;...}..|.Super.P|
|00000560| 6f 73 74 42 65 67 69 6e | 50 6c 61 79 28 29 3b 0d |ostBegin|Play();.|
|00000570| 0a 7d 0d 0a 0d 0a 2f 2f | 20 52 65 63 65 69 76 65 |.}....//| Receive|
|00000580| 64 20 61 20 71 75 65 72 | 79 20 72 65 71 75 65 73 |d a quer|y reques|
|00000590| 74 2e 0d 0a 65 76 65 6e | 74 20 52 65 63 65 69 76 |t...even|t Receiv|
|000005a0| 65 64 54 65 78 74 28 20 | 49 70 41 64 64 72 20 41 |edText( |IpAddr A|
|000005b0| 64 64 72 2c 20 73 74 72 | 69 6e 67 20 54 65 78 74 |ddr, str|ing Text|
|000005c0| 20 29 0d 0a 7b 0d 0a 09 | 6c 6f 63 61 6c 20 73 74 | )..{...|local st|
|000005d0| 72 69 6e 67 20 51 75 65 | 72 79 3b 0d 0a 09 6c 6f |ring Que|ry;...lo|
|000005e0| 63 61 6c 20 62 6f 6f 6c | 20 51 75 65 72 79 52 65 |cal bool| QueryRe|
|000005f0| 6d 61 69 6e 69 6e 67 3b | 0d 0a 09 6c 6f 63 61 6c |maining;|...local|
|00000600| 20 69 6e 74 20 20 51 75 | 65 72 79 4e 75 6d 2c 20 | int Qu|eryNum, |
|00000610| 50 61 63 6b 65 74 4e 75 | 6d 3b 0d 0a 0d 0a 09 2f |PacketNu|m;...../|
|00000620| 2f 20 41 73 73 69 67 6e | 20 74 68 69 73 20 70 61 |/ Assign| this pa|
|00000630| 63 6b 65 74 20 61 20 75 | 6e 69 71 75 65 20 76 61 |cket a u|nique va|
|00000640| 6c 75 65 20 66 72 6f 6d | 20 31 20 74 6f 20 31 30 |lue from| 1 to 10|
|00000650| 30 0d 0a 09 43 75 72 72 | 65 6e 74 51 75 65 72 79 |0...Curr|entQuery|
|00000660| 4e 75 6d 2b 2b 3b 0d 0a | 09 69 66 20 28 43 75 72 |Num++;..|.if (Cur|
|00000670| 72 65 6e 74 51 75 65 72 | 79 4e 75 6d 20 3e 20 31 |rentQuer|yNum > 1|
|00000680| 30 30 29 0d 0a 09 09 43 | 75 72 72 65 6e 74 51 75 |00)....C|urrentQu|
|00000690| 65 72 79 4e 75 6d 20 3d | 20 31 3b 0d 0a 09 51 75 |eryNum =| 1;...Qu|
|000006a0| 65 72 79 4e 75 6d 20 3d | 20 43 75 72 72 65 6e 74 |eryNum =| Current|
|000006b0| 51 75 65 72 79 4e 75 6d | 3b 0d 0a 0d 0a 09 51 75 |QueryNum|;.....Qu|
|000006c0| 65 72 79 20 3d 20 54 65 | 78 74 3b 0d 0a 09 69 66 |ery = Te|xt;...if|
|000006d0| 20 28 51 75 65 72 79 20 | 3d 3d 20 22 22 29 09 09 | (Query |== "")..|
|000006e0| 2f 2f 20 49 66 20 74 68 | 65 20 73 74 72 69 6e 67 |// If th|e string|
|000006f0| 20 69 73 20 65 6d 70 74 | 79 2c 20 64 6f 6e 27 74 | is empt|y, don't|
|00000700| 20 70 61 72 73 65 20 69 | 74 0d 0a 09 09 51 75 65 | parse i|t....Que|
|00000710| 72 79 52 65 6d 61 69 6e | 69 6e 67 20 3d 20 66 61 |ryRemain|ing = fa|
|00000720| 6c 73 65 3b 0d 0a 09 65 | 6c 73 65 0d 0a 09 09 51 |lse;...e|lse....Q|
|00000730| 75 65 72 79 52 65 6d 61 | 69 6e 69 6e 67 20 3d 20 |ueryRema|ining = |
|00000740| 74 72 75 65 3b 0d 0a 09 | 0d 0a 09 77 68 69 6c 65 |true;...|...while|
|00000750| 20 28 51 75 65 72 79 52 | 65 6d 61 69 6e 69 6e 67 | (QueryR|emaining|
|00000760| 29 20 7b 0d 0a 09 09 51 | 75 65 72 79 20 3d 20 50 |) {....Q|uery = P|
|00000770| 61 72 73 65 51 75 65 72 | 79 28 41 64 64 72 2c 20 |arseQuer|y(Addr, |
|00000780| 51 75 65 72 79 2c 20 51 | 75 65 72 79 4e 75 6d 2c |Query, Q|ueryNum,|
|00000790| 20 50 61 63 6b 65 74 4e | 75 6d 29 3b 0d 0a 09 09 | PacketN|um);....|
|000007a0| 69 66 20 28 51 75 65 72 | 79 20 3d 3d 20 22 22 29 |if (Quer|y == "")|
|000007b0| 0d 0a 09 09 09 51 75 65 | 72 79 52 65 6d 61 69 6e |.....Que|ryRemain|
|000007c0| 69 6e 67 20 3d 20 66 61 | 6c 73 65 3b 0d 0a 09 09 |ing = fa|lse;....|
|000007d0| 65 6c 73 65 0d 0a 09 09 | 09 51 75 65 72 79 52 65 |else....|.QueryRe|
|000007e0| 6d 61 69 6e 69 6e 67 20 | 3d 20 74 72 75 65 3b 0d |maining |= true;.|
|000007f0| 0a 09 7d 0d 0a 7d 0d 0a | 0d 0a 66 75 6e 63 74 69 |..}..}..|..functi|
|00000800| 6f 6e 20 62 6f 6f 6c 20 | 50 61 72 73 65 4e 65 78 |on bool |ParseNex|
|00000810| 74 51 75 65 72 79 28 20 | 73 74 72 69 6e 67 20 51 |tQuery( |string Q|
|00000820| 75 65 72 79 2c 20 6f 75 | 74 20 73 74 72 69 6e 67 |uery, ou|t string|
|00000830| 20 51 75 65 72 79 54 79 | 70 65 2c 20 6f 75 74 20 | QueryTy|pe, out |
|00000840| 73 74 72 69 6e 67 20 51 | 75 65 72 79 56 61 6c 75 |string Q|ueryValu|
|00000850| 65 2c 20 6f 75 74 20 73 | 74 72 69 6e 67 20 51 75 |e, out s|tring Qu|
|00000860| 65 72 79 52 65 73 74 2c | 20 6f 75 74 20 73 74 72 |eryRest,| out str|
|00000870| 69 6e 67 20 46 69 6e 61 | 6c 50 61 63 6b 65 74 20 |ing Fina|lPacket |
|00000880| 29 0d 0a 7b 0d 0a 09 6c | 6f 63 61 6c 20 73 74 72 |)..{...l|ocal str|
|00000890| 69 6e 67 20 54 65 6d 70 | 51 75 65 72 79 3b 0d 0a |ing Temp|Query;..|
|000008a0| 09 6c 6f 63 61 6c 20 69 | 6e 74 20 43 6c 6f 73 69 |.local i|nt Closi|
|000008b0| 6e 67 53 6c 61 73 68 3b | 0d 0a 0d 0a 09 69 66 20 |ngSlash;|.....if |
|000008c0| 28 51 75 65 72 79 20 3d | 3d 20 22 22 29 0d 0a 09 |(Query =|= "")...|
|000008d0| 09 72 65 74 75 72 6e 20 | 66 61 6c 73 65 3b 0d 0a |.return |false;..|
|000008e0| 0d 0a 09 2f 2f 20 51 75 | 65 72 79 20 73 68 6f 75 |...// Qu|ery shou|
|000008f0| 6c 64 20 62 65 3a 0d 0a | 09 2f 2f 20 20 20 5c 5b |ld be:..|.// \[|
|00000900| 74 79 70 65 5d 5c 3c 76 | 61 6c 75 65 3e 0d 0a 09 |type]\<v|alue>...|
|00000910| 69 66 20 28 4c 65 66 74 | 28 51 75 65 72 79 2c 20 |if (Left|(Query, |
|00000920| 31 29 20 3d 3d 20 22 5c | 5c 22 29 0d 0a 09 7b 0d |1) == "\|\")...{.|
|00000930| 0a 09 09 2f 2f 20 43 68 | 65 63 6b 20 74 6f 20 73 |...// Ch|eck to s|
|00000940| 65 65 20 69 66 20 63 6c | 6f 73 65 64 2e 0d 0a 09 |ee if cl|osed....|
|00000950| 09 43 6c 6f 73 69 6e 67 | 53 6c 61 73 68 20 3d 20 |.Closing|Slash = |
|00000960| 49 6e 53 74 72 28 52 69 | 67 68 74 28 51 75 65 72 |InStr(Ri|ght(Quer|
|00000970| 79 2c 20 4c 65 6e 28 51 | 75 65 72 79 29 2d 31 29 |y, Len(Q|uery)-1)|
|00000980| 2c 20 22 5c 5c 22 29 3b | 0d 0a 09 09 69 66 20 28 |, "\\");|....if (|
|00000990| 43 6c 6f 73 69 6e 67 53 | 6c 61 73 68 20 3d 3d 20 |ClosingS|lash == |
|000009a0| 30 29 0d 0a 09 09 09 72 | 65 74 75 72 6e 20 66 61 |0).....r|eturn fa|
|000009b0| 6c 73 65 3b 0d 0a 0d 0a | 09 09 54 65 6d 70 51 75 |lse;....|..TempQu|
|000009c0| 65 72 79 20 3d 20 51 75 | 65 72 79 3b 0d 0a 0d 0a |ery = Qu|ery;....|
|000009d0| 09 09 2f 2f 20 51 75 65 | 72 79 20 6c 6f 6f 6b 73 |..// Que|ry looks|
|000009e0| 20 6c 69 6b 65 3a 0d 0a | 09 09 2f 2f 20 20 5c 5b | like:..|..// \[|
|000009f0| 74 79 70 65 5d 5c 0d 0a | 09 09 51 75 65 72 79 54 |type]\..|..QueryT|
|00000a00| 79 70 65 20 3d 20 52 69 | 67 68 74 28 51 75 65 72 |ype = Ri|ght(Quer|
|00000a10| 79 2c 20 4c 65 6e 28 51 | 75 65 72 79 29 2d 31 29 |y, Len(Q|uery)-1)|
|00000a20| 3b 0d 0a 09 09 51 75 65 | 72 79 54 79 70 65 20 3d |;....Que|ryType =|
|00000a30| 20 4c 65 66 74 28 51 75 | 65 72 79 54 79 70 65 2c | Left(Qu|eryType,|
|00000a40| 20 43 6c 6f 73 69 6e 67 | 53 6c 61 73 68 29 3b 0d | Closing|Slash);.|
|00000a50| 0a 0d 0a 09 09 51 75 65 | 72 79 52 65 73 74 20 3d |.....Que|ryRest =|
|00000a60| 20 52 69 67 68 74 28 51 | 75 65 72 79 2c 20 4c 65 | Right(Q|uery, Le|
|00000a70| 6e 28 51 75 65 72 79 29 | 20 2d 20 28 4c 65 6e 28 |n(Query)| - (Len(|
|00000a80| 51 75 65 72 79 54 79 70 | 65 29 20 2b 20 32 29 29 |QueryTyp|e) + 2))|
|00000a90| 3b 0d 0a 0d 0a 09 09 69 | 66 20 28 28 51 75 65 72 |;......i|f ((Quer|
|00000aa0| 79 52 65 73 74 20 3d 3d | 20 22 22 29 20 7c 7c 20 |yRest ==| "") || |
|00000ab0| 28 4c 65 6e 28 51 75 65 | 72 79 52 65 73 74 29 20 |(Len(Que|ryRest) |
|00000ac0| 3d 3d 20 31 29 29 0d 0a | 09 09 7b 0d 0a 09 09 09 |== 1))..|..{.....|
|00000ad0| 46 69 6e 61 6c 50 61 63 | 6b 65 74 20 3d 20 22 66 |FinalPac|ket = "f|
|00000ae0| 69 6e 61 6c 22 3b 0d 0a | 09 09 09 72 65 74 75 72 |inal";..|...retur|
|00000af0| 6e 20 74 72 75 65 3b 0d | 0a 09 09 7d 20 65 6c 73 |n true;.|...} els|
|00000b00| 65 20 69 66 20 28 4c 65 | 66 74 28 51 75 65 72 79 |e if (Le|ft(Query|
|00000b10| 52 65 73 74 2c 20 31 29 | 20 3d 3d 20 22 5c 5c 22 |Rest, 1)| == "\\"|
|00000b20| 29 0d 0a 09 09 09 72 65 | 74 75 72 6e 20 74 72 75 |).....re|turn tru|
|00000b30| 65 3b 09 2f 2f 20 5c 74 | 79 70 65 5c 5c 0d 0a 0d |e;.// \t|ype\\...|
|00000b40| 0a 09 09 2f 2f 20 51 75 | 65 72 79 20 6c 6f 6f 6b |...// Qu|ery look|
|00000b50| 73 20 6c 69 6b 65 3a 0d | 0a 09 09 2f 2f 20 20 5c |s like:.|...// \|
|00000b60| 74 79 70 65 5c 76 61 6c | 75 65 0d 0a 09 09 43 6c |type\val|ue....Cl|
|00000b70| 6f 73 69 6e 67 53 6c 61 | 73 68 20 3d 20 49 6e 53 |osingSla|sh = InS|
|00000b80| 74 72 28 51 75 65 72 79 | 52 65 73 74 2c 20 22 5c |tr(Query|Rest, "\|
|00000b90| 5c 22 29 3b 0d 0a 09 09 | 69 66 20 28 43 6c 6f 73 |\");....|if (Clos|
|00000ba0| 69 6e 67 53 6c 61 73 68 | 20 3e 3d 20 30 29 0d 0a |ingSlash| >= 0)..|
|00000bb0| 09 09 09 51 75 65 72 79 | 56 61 6c 75 65 20 3d 20 |...Query|Value = |
|00000bc0| 4c 65 66 74 28 51 75 65 | 72 79 52 65 73 74 2c 20 |Left(Que|ryRest, |
|00000bd0| 43 6c 6f 73 69 6e 67 53 | 6c 61 73 68 29 3b 0d 0a |ClosingS|lash);..|
|00000be0| 09 09 65 6c 73 65 0d 0a | 09 09 09 51 75 65 72 79 |..else..|...Query|
|00000bf0| 56 61 6c 75 65 20 3d 20 | 51 75 65 72 79 52 65 73 |Value = |QueryRes|
|00000c00| 74 3b 0d 0a 0d 0a 09 09 | 51 75 65 72 79 52 65 73 |t;......|QueryRes|
|00000c10| 74 20 3d 20 52 69 67 68 | 74 28 51 75 65 72 79 2c |t = Righ|t(Query,|
|00000c20| 20 4c 65 6e 28 51 75 65 | 72 79 29 20 2d 20 28 4c | Len(Que|ry) - (L|
|00000c30| 65 6e 28 51 75 65 72 79 | 54 79 70 65 29 20 2b 20 |en(Query|Type) + |
|00000c40| 4c 65 6e 28 51 75 65 72 | 79 56 61 6c 75 65 29 20 |Len(Quer|yValue) |
|00000c50| 2b 20 33 29 29 3b 0d 0a | 09 09 69 66 20 28 51 75 |+ 3));..|..if (Qu|
|00000c60| 65 72 79 52 65 73 74 20 | 3d 3d 20 22 22 29 0d 0a |eryRest |== "")..|
|00000c70| 09 09 7b 0d 0a 09 09 09 | 46 69 6e 61 6c 50 61 63 |..{.....|FinalPac|
|00000c80| 6b 65 74 20 3d 20 22 66 | 69 6e 61 6c 22 3b 0d 0a |ket = "f|inal";..|
|00000c90| 09 09 09 72 65 74 75 72 | 6e 20 74 72 75 65 3b 0d |...retur|n true;.|
|00000ca0| 0a 09 09 7d 20 65 6c 73 | 65 0d 0a 09 09 09 72 65 |...} els|e.....re|
|00000cb0| 74 75 72 6e 20 74 72 75 | 65 3b 0d 0a 09 7d 20 65 |turn tru|e;...} e|
|00000cc0| 6c 73 65 20 7b 0d 0a 09 | 09 72 65 74 75 72 6e 20 |lse {...|.return |
|00000cd0| 66 61 6c 73 65 3b 0d 0a | 09 7d 0d 0a 7d 0d 0a 0d |false;..|.}..}...|
|00000ce0| 0a 66 75 6e 63 74 69 6f | 6e 20 73 74 72 69 6e 67 |.functio|n string|
|00000cf0| 20 50 61 72 73 65 51 75 | 65 72 79 28 20 49 70 41 | ParseQu|ery( IpA|
|00000d00| 64 64 72 20 41 64 64 72 | 2c 20 63 6f 65 72 63 65 |ddr Addr|, coerce|
|00000d10| 20 73 74 72 69 6e 67 20 | 51 75 65 72 79 2c 20 69 | string |Query, i|
|00000d20| 6e 74 20 51 75 65 72 79 | 4e 75 6d 2c 20 6f 75 74 |nt Query|Num, out|
|00000d30| 20 69 6e 74 20 50 61 63 | 6b 65 74 4e 75 6d 20 29 | int Pac|ketNum )|
|00000d40| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 73 74 72 69 |..{...lo|cal stri|
|00000d50| 6e 67 20 51 75 65 72 79 | 54 79 70 65 2c 20 51 75 |ng Query|Type, Qu|
|00000d60| 65 72 79 56 61 6c 75 65 | 2c 20 51 75 65 72 79 52 |eryValue|, QueryR|
|00000d70| 65 73 74 2c 20 56 61 6c | 69 64 61 74 69 6f 6e 53 |est, Val|idationS|
|00000d80| 74 72 69 6e 67 3b 0d 0a | 09 6c 6f 63 61 6c 20 62 |tring;..|.local b|
|00000d90| 6f 6f 6c 20 52 65 73 75 | 6c 74 3b 0d 0a 09 6c 6f |ool Resu|lt;...lo|
|00000da0| 63 61 6c 20 73 74 72 69 | 6e 67 20 46 69 6e 61 6c |cal stri|ng Final|
|00000db0| 50 61 63 6b 65 74 3b 0d | 0a 09 0d 0a 09 52 65 73 |Packet;.|.....Res|
|00000dc0| 75 6c 74 20 3d 20 50 61 | 72 73 65 4e 65 78 74 51 |ult = Pa|rseNextQ|
|00000dd0| 75 65 72 79 28 51 75 65 | 72 79 2c 20 51 75 65 72 |uery(Que|ry, Quer|
|00000de0| 79 54 79 70 65 2c 20 51 | 75 65 72 79 56 61 6c 75 |yType, Q|ueryValu|
|00000df0| 65 2c 20 51 75 65 72 79 | 52 65 73 74 2c 20 46 69 |e, Query|Rest, Fi|
|00000e00| 6e 61 6c 50 61 63 6b 65 | 74 29 3b 0d 0a 09 69 66 |nalPacke|t);...if|
|00000e10| 28 20 21 52 65 73 75 6c | 74 20 29 0d 0a 09 09 72 |( !Resul|t )....r|
|00000e20| 65 74 75 72 6e 20 22 22 | 3b 0d 0a 0d 0a 09 69 66 |eturn ""|;.....if|
|00000e30| 28 20 51 75 65 72 79 54 | 79 70 65 3d 3d 22 62 61 |( QueryT|ype=="ba|
|00000e40| 73 69 63 22 20 29 0d 0a | 09 7b 0d 0a 09 09 52 65 |sic" )..|.{....Re|
|00000e50| 73 75 6c 74 20 3d 20 53 | 65 6e 64 51 75 65 72 79 |sult = S|endQuery|
|00000e60| 50 61 63 6b 65 74 28 41 | 64 64 72 2c 20 47 65 74 |Packet(A|ddr, Get|
|00000e70| 42 61 73 69 63 28 29 2c | 20 51 75 65 72 79 4e 75 |Basic(),| QueryNu|
|00000e80| 6d 2c 20 2b 2b 50 61 63 | 6b 65 74 4e 75 6d 2c 20 |m, ++Pac|ketNum, |
|00000e90| 46 69 6e 61 6c 50 61 63 | 6b 65 74 29 3b 0d 0a 09 |FinalPac|ket);...|
|00000ea0| 7d 0d 0a 09 65 6c 73 65 | 20 69 66 28 20 51 75 65 |}...else| if( Que|
|00000eb0| 72 79 54 79 70 65 3d 3d | 22 69 6e 66 6f 22 20 29 |ryType==|"info" )|
|00000ec0| 0d 0a 09 7b 0d 0a 09 09 | 52 65 73 75 6c 74 20 3d |...{....|Result =|
|00000ed0| 20 53 65 6e 64 51 75 65 | 72 79 50 61 63 6b 65 74 | SendQue|ryPacket|
|00000ee0| 28 41 64 64 72 2c 20 47 | 65 74 49 6e 66 6f 28 29 |(Addr, G|etInfo()|
|00000ef0| 2c 20 51 75 65 72 79 4e | 75 6d 2c 20 2b 2b 50 61 |, QueryN|um, ++Pa|
|00000f00| 63 6b 65 74 4e 75 6d 2c | 20 46 69 6e 61 6c 50 61 |cketNum,| FinalPa|
|00000f10| 63 6b 65 74 29 3b 0d 0a | 09 7d 0d 0a 09 65 6c 73 |cket);..|.}...els|
|00000f20| 65 20 69 66 28 20 51 75 | 65 72 79 54 79 70 65 3d |e if( Qu|eryType=|
|00000f30| 3d 22 72 75 6c 65 73 22 | 20 29 0d 0a 09 7b 0d 0a |="rules"| )...{..|
|00000f40| 09 09 52 65 73 75 6c 74 | 20 3d 20 53 65 6e 64 51 |..Result| = SendQ|
|00000f50| 75 65 72 79 50 61 63 6b | 65 74 28 41 64 64 72 2c |ueryPack|et(Addr,|
|00000f60| 20 47 65 74 52 75 6c 65 | 73 28 29 2c 20 51 75 65 | GetRule|s(), Que|
|00000f70| 72 79 4e 75 6d 2c 20 2b | 2b 50 61 63 6b 65 74 4e |ryNum, +|+PacketN|
|00000f80| 75 6d 2c 20 46 69 6e 61 | 6c 50 61 63 6b 65 74 29 |um, Fina|lPacket)|
|00000f90| 3b 0d 0a 09 7d 0d 0a 09 | 65 6c 73 65 20 69 66 28 |;...}...|else if(|
|00000fa0| 20 51 75 65 72 79 54 79 | 70 65 3d 3d 22 70 6c 61 | QueryTy|pe=="pla|
|00000fb0| 79 65 72 73 22 20 29 0d | 0a 09 7b 0d 0a 09 09 69 |yers" ).|..{....i|
|00000fc0| 66 28 20 4c 65 76 65 6c | 2e 47 61 6d 65 2e 4e 75 |f( Level|.Game.Nu|
|00000fd0| 6d 50 6c 61 79 65 72 73 | 20 3e 20 30 20 29 0d 0a |mPlayers| > 0 )..|
|00000fe0| 09 09 09 52 65 73 75 6c | 74 20 3d 20 53 65 6e 64 |...Resul|t = Send|
|00000ff0| 50 6c 61 79 65 72 73 28 | 41 64 64 72 2c 20 51 75 |Players(|Addr, Qu|
|00001000| 65 72 79 4e 75 6d 2c 20 | 50 61 63 6b 65 74 4e 75 |eryNum, |PacketNu|
|00001010| 6d 2c 20 46 69 6e 61 6c | 50 61 63 6b 65 74 29 3b |m, Final|Packet);|
|00001020| 0d 0a 09 09 65 6c 73 65 | 0d 0a 09 09 09 52 65 73 |....else|.....Res|
|00001030| 75 6c 74 20 3d 20 53 65 | 6e 64 51 75 65 72 79 50 |ult = Se|ndQueryP|
|00001040| 61 63 6b 65 74 28 41 64 | 64 72 2c 20 22 22 2c 20 |acket(Ad|dr, "", |
|00001050| 51 75 65 72 79 4e 75 6d | 2c 20 50 61 63 6b 65 74 |QueryNum|, Packet|
|00001060| 4e 75 6d 2c 20 46 69 6e | 61 6c 50 61 63 6b 65 74 |Num, Fin|alPacket|
|00001070| 29 3b 0d 0a 09 7d 0d 0a | 09 65 6c 73 65 20 69 66 |);...}..|.else if|
|00001080| 28 20 51 75 65 72 79 54 | 79 70 65 3d 3d 22 73 74 |( QueryT|ype=="st|
|00001090| 61 74 75 73 22 20 29 0d | 0a 09 7b 0d 0a 09 09 52 |atus" ).|..{....R|
|000010a0| 65 73 75 6c 74 20 3d 20 | 53 65 6e 64 51 75 65 72 |esult = |SendQuer|
|000010b0| 79 50 61 63 6b 65 74 28 | 41 64 64 72 2c 20 47 65 |yPacket(|Addr, Ge|
|000010c0| 74 42 61 73 69 63 28 29 | 2c 20 51 75 65 72 79 4e |tBasic()|, QueryN|
|000010d0| 75 6d 2c 20 2b 2b 50 61 | 63 6b 65 74 4e 75 6d 2c |um, ++Pa|cketNum,|
|000010e0| 20 22 22 29 3b 0d 0a 09 | 09 52 65 73 75 6c 74 20 | "");...|.Result |
|000010f0| 3d 20 53 65 6e 64 51 75 | 65 72 79 50 61 63 6b 65 |= SendQu|eryPacke|
|00001100| 74 28 41 64 64 72 2c 20 | 47 65 74 49 6e 66 6f 28 |t(Addr, |GetInfo(|
|00001110| 29 2c 20 51 75 65 72 79 | 4e 75 6d 2c 20 2b 2b 50 |), Query|Num, ++P|
|00001120| 61 63 6b 65 74 4e 75 6d | 2c 20 22 22 29 3b 0d 0a |acketNum|, "");..|
|00001130| 09 09 69 66 28 20 4c 65 | 76 65 6c 2e 47 61 6d 65 |..if( Le|vel.Game|
|00001140| 2e 4e 75 6d 50 6c 61 79 | 65 72 73 20 3d 3d 20 30 |.NumPlay|ers == 0|
|00001150| 20 29 0d 0a 09 09 7b 0d | 0a 09 09 09 52 65 73 75 | )....{.|....Resu|
|00001160| 6c 74 20 3d 20 53 65 6e | 64 51 75 65 72 79 50 61 |lt = Sen|dQueryPa|
|00001170| 63 6b 65 74 28 41 64 64 | 72 2c 20 47 65 74 52 75 |cket(Add|r, GetRu|
|00001180| 6c 65 73 28 29 2c 20 51 | 75 65 72 79 4e 75 6d 2c |les(), Q|ueryNum,|
|00001190| 20 2b 2b 50 61 63 6b 65 | 74 4e 75 6d 2c 20 46 69 | ++Packe|tNum, Fi|
|000011a0| 6e 61 6c 50 61 63 6b 65 | 74 29 3b 0d 0a 09 09 7d |nalPacke|t);....}|
|000011b0| 0d 0a 09 09 65 6c 73 65 | 0d 0a 09 09 7b 0d 0a 09 |....else|....{...|
|000011c0| 09 09 52 65 73 75 6c 74 | 20 3d 20 53 65 6e 64 51 |..Result| = SendQ|
|000011d0| 75 65 72 79 50 61 63 6b | 65 74 28 41 64 64 72 2c |ueryPack|et(Addr,|
|000011e0| 20 47 65 74 52 75 6c 65 | 73 28 29 2c 20 51 75 65 | GetRule|s(), Que|
|000011f0| 72 79 4e 75 6d 2c 20 2b | 2b 50 61 63 6b 65 74 4e |ryNum, +|+PacketN|
|00001200| 75 6d 2c 20 22 22 29 3b | 0d 0a 09 09 09 52 65 73 |um, "");|.....Res|
|00001210| 75 6c 74 20 3d 20 53 65 | 6e 64 50 6c 61 79 65 72 |ult = Se|ndPlayer|
|00001220| 73 28 41 64 64 72 2c 20 | 51 75 65 72 79 4e 75 6d |s(Addr, |QueryNum|
|00001230| 2c 20 50 61 63 6b 65 74 | 4e 75 6d 2c 20 46 69 6e |, Packet|Num, Fin|
|00001240| 61 6c 50 61 63 6b 65 74 | 29 3b 0d 0a 09 09 7d 0d |alPacket|);....}.|
|00001250| 0a 09 7d 0d 0a 09 65 6c | 73 65 20 69 66 28 20 51 |..}...el|se if( Q|
|00001260| 75 65 72 79 54 79 70 65 | 3d 3d 22 65 63 68 6f 22 |ueryType|=="echo"|
|00001270| 20 29 0d 0a 09 7b 0d 0a | 09 09 2f 2f 20 52 65 73 | )...{..|..// Res|
|00001280| 70 6f 6e 64 20 74 6f 20 | 61 6e 20 65 63 68 6f 20 |pond to |an echo |
|00001290| 77 69 74 68 20 74 68 65 | 20 73 61 6d 65 20 73 74 |with the| same st|
|000012a0| 72 69 6e 67 0d 0a 09 09 | 52 65 73 75 6c 74 20 3d |ring....|Result =|
|000012b0| 20 53 65 6e 64 51 75 65 | 72 79 50 61 63 6b 65 74 | SendQue|ryPacket|
|000012c0| 28 41 64 64 72 2c 20 22 | 5c 5c 65 63 68 6f 5c 5c |(Addr, "|\\echo\\|
|000012d0| 22 24 51 75 65 72 79 56 | 61 6c 75 65 2c 20 51 75 |"$QueryV|alue, Qu|
|000012e0| 65 72 79 4e 75 6d 2c 20 | 2b 2b 50 61 63 6b 65 74 |eryNum, |++Packet|
|000012f0| 4e 75 6d 2c 20 46 69 6e | 61 6c 50 61 63 6b 65 74 |Num, Fin|alPacket|
|00001300| 29 3b 0d 0a 09 7d 0d 0a | 09 65 6c 73 65 20 69 66 |);...}..|.else if|
|00001310| 28 20 51 75 65 72 79 54 | 79 70 65 3d 3d 22 73 65 |( QueryT|ype=="se|
|00001320| 63 75 72 65 22 20 29 0d | 0a 09 7b 0d 0a 09 09 56 |cure" ).|..{....V|
|00001330| 61 6c 69 64 61 74 69 6f | 6e 53 74 72 69 6e 67 20 |alidatio|nString |
|00001340| 3d 20 22 5c 5c 76 61 6c | 69 64 61 74 65 5c 5c 22 |= "\\val|idate\\"|
|00001350| 24 56 61 6c 69 64 61 74 | 65 28 51 75 65 72 79 56 |$Validat|e(QueryV|
|00001360| 61 6c 75 65 2c 20 47 61 | 6d 65 4e 61 6d 65 29 3b |alue, Ga|meName);|
|00001370| 0d 0a 09 09 52 65 73 75 | 6c 74 20 3d 20 53 65 6e |....Resu|lt = Sen|
|00001380| 64 51 75 65 72 79 50 61 | 63 6b 65 74 28 41 64 64 |dQueryPa|cket(Add|
|00001390| 72 2c 20 56 61 6c 69 64 | 61 74 69 6f 6e 53 74 72 |r, Valid|ationStr|
|000013a0| 69 6e 67 2c 20 51 75 65 | 72 79 4e 75 6d 2c 20 2b |ing, Que|ryNum, +|
|000013b0| 2b 50 61 63 6b 65 74 4e | 75 6d 2c 20 46 69 6e 61 |+PacketN|um, Fina|
|000013c0| 6c 50 61 63 6b 65 74 29 | 3b 0d 0a 09 7d 0d 0a 09 |lPacket)|;...}...|
|000013d0| 65 6c 73 65 20 69 66 28 | 20 51 75 65 72 79 54 79 |else if(| QueryTy|
|000013e0| 70 65 3d 3d 22 6c 65 76 | 65 6c 5f 70 72 6f 70 65 |pe=="lev|el_prope|
|000013f0| 72 74 79 22 20 29 0d 0a | 09 7b 0d 0a 09 09 52 65 |rty" )..|.{....Re|
|00001400| 73 75 6c 74 20 3d 20 53 | 65 6e 64 51 75 65 72 79 |sult = S|endQuery|
|00001410| 50 61 63 6b 65 74 28 41 | 64 64 72 2c 20 47 65 74 |Packet(A|ddr, Get|
|00001420| 4c 65 76 65 6c 50 72 6f | 70 65 72 74 79 28 51 75 |LevelPro|perty(Qu|
|00001430| 65 72 79 56 61 6c 75 65 | 29 2c 20 51 75 65 72 79 |eryValue|), Query|
|00001440| 4e 75 6d 2c 20 2b 2b 50 | 61 63 6b 65 74 4e 75 6d |Num, ++P|acketNum|
|00001450| 2c 20 46 69 6e 61 6c 50 | 61 63 6b 65 74 29 3b 0d |, FinalP|acket);.|
|00001460| 0a 09 7d 0d 0a 09 65 6c | 73 65 20 69 66 28 20 51 |..}...el|se if( Q|
|00001470| 75 65 72 79 54 79 70 65 | 3d 3d 22 67 61 6d 65 5f |ueryType|=="game_|
|00001480| 70 72 6f 70 65 72 74 79 | 22 20 29 0d 0a 09 7b 0d |property|" )...{.|
|00001490| 0a 09 09 09 52 65 73 75 | 6c 74 20 3d 20 53 65 6e |....Resu|lt = Sen|
|000014a0| 64 51 75 65 72 79 50 61 | 63 6b 65 74 28 41 64 64 |dQueryPa|cket(Add|
|000014b0| 72 2c 20 47 65 74 47 61 | 6d 65 50 72 6f 70 65 72 |r, GetGa|meProper|
|000014c0| 74 79 28 51 75 65 72 79 | 56 61 6c 75 65 29 2c 20 |ty(Query|Value), |
|000014d0| 51 75 65 72 79 4e 75 6d | 2c 20 2b 2b 50 61 63 6b |QueryNum|, ++Pack|
|000014e0| 65 74 4e 75 6d 2c 20 46 | 69 6e 61 6c 50 61 63 6b |etNum, F|inalPack|
|000014f0| 65 74 29 3b 0d 0a 09 7d | 0d 0a 09 65 6c 73 65 20 |et);...}|...else |
|00001500| 69 66 28 20 51 75 65 72 | 79 54 79 70 65 3d 3d 22 |if( Quer|yType=="|
|00001510| 70 6c 61 79 65 72 5f 70 | 72 6f 70 65 72 74 79 22 |player_p|roperty"|
|00001520| 20 29 0d 0a 09 7b 0d 0a | 09 09 52 65 73 75 6c 74 | )...{..|..Result|
|00001530| 20 3d 20 53 65 6e 64 51 | 75 65 72 79 50 61 63 6b | = SendQ|ueryPack|
|00001540| 65 74 28 41 64 64 72 2c | 20 47 65 74 50 6c 61 79 |et(Addr,| GetPlay|
|00001550| 65 72 50 72 6f 70 65 72 | 74 79 28 51 75 65 72 79 |erProper|ty(Query|
|00001560| 56 61 6c 75 65 29 2c 20 | 51 75 65 72 79 4e 75 6d |Value), |QueryNum|
|00001570| 2c 20 2b 2b 50 61 63 6b | 65 74 4e 75 6d 2c 20 46 |, ++Pack|etNum, F|
|00001580| 69 6e 61 6c 50 61 63 6b | 65 74 29 3b 0d 0a 09 7d |inalPack|et);...}|
|00001590| 0d 0a 09 65 6c 73 65 0d | 0a 09 7b 0d 0a 09 09 4c |...else.|..{....L|
|000015a0| 6f 67 28 22 55 64 70 53 | 65 72 76 65 72 51 75 65 |og("UdpS|erverQue|
|000015b0| 72 79 3a 20 55 6e 6b 6e | 6f 77 6e 20 71 75 65 72 |ry: Unkn|own quer|
|000015c0| 79 3a 20 22 24 51 75 65 | 72 79 54 79 70 65 29 3b |y: "$Que|ryType);|
|000015d0| 0d 0a 09 7d 0d 0a 09 69 | 66 28 20 21 52 65 73 75 |...}...i|f( !Resu|
|000015e0| 6c 74 20 29 0d 0a 09 09 | 4c 6f 67 28 22 55 64 70 |lt )....|Log("Udp|
|000015f0| 53 65 72 76 65 72 51 75 | 65 72 79 3a 20 45 72 72 |ServerQu|ery: Err|
|00001600| 6f 72 20 72 65 73 70 6f | 6e 64 69 6e 67 20 74 6f |or respo|nding to|
|00001610| 20 71 75 65 72 79 2e 22 | 29 3b 0d 0a 09 72 65 74 | query."|);...ret|
|00001620| 75 72 6e 20 51 75 65 72 | 79 52 65 73 74 3b 0d 0a |urn Quer|yRest;..|
|00001630| 7d 0d 0a 0d 0a 2f 2f 20 | 53 65 6e 64 51 75 65 72 |}....// |SendQuer|
|00001640| 79 50 61 63 6b 65 74 20 | 69 73 20 61 20 77 72 61 |yPacket |is a wra|
|00001650| 70 70 65 72 20 66 6f 72 | 20 53 65 6e 64 54 65 78 |pper for| SendTex|
|00001660| 74 20 74 68 61 74 20 61 | 6c 6c 6f 77 73 20 66 6f |t that a|llows fo|
|00001670| 72 20 70 61 63 6b 65 74 | 20 6e 75 6d 62 65 72 69 |r packet| numberi|
|00001680| 6e 67 2e 0d 0a 66 75 6e | 63 74 69 6f 6e 20 62 6f |ng...fun|ction bo|
|00001690| 6f 6c 20 53 65 6e 64 51 | 75 65 72 79 50 61 63 6b |ol SendQ|ueryPack|
|000016a0| 65 74 28 49 70 41 64 64 | 72 20 41 64 64 72 2c 20 |et(IpAdd|r Addr, |
|000016b0| 63 6f 65 72 63 65 20 73 | 74 72 69 6e 67 20 53 65 |coerce s|tring Se|
|000016c0| 6e 64 53 74 72 69 6e 67 | 2c 20 69 6e 74 20 51 75 |ndString|, int Qu|
|000016d0| 65 72 79 4e 75 6d 2c 20 | 69 6e 74 20 50 61 63 6b |eryNum, |int Pack|
|000016e0| 65 74 4e 75 6d 2c 20 73 | 74 72 69 6e 67 20 46 69 |etNum, s|tring Fi|
|000016f0| 6e 61 6c 50 61 63 6b 65 | 74 29 0d 0a 7b 0d 0a 09 |nalPacke|t)..{...|
|00001700| 6c 6f 63 61 6c 20 62 6f | 6f 6c 20 52 65 73 75 6c |local bo|ol Resul|
|00001710| 74 3b 0d 0a 09 69 66 20 | 28 46 69 6e 61 6c 50 61 |t;...if |(FinalPa|
|00001720| 63 6b 65 74 20 3d 3d 20 | 22 66 69 6e 61 6c 22 29 |cket == |"final")|
|00001730| 20 7b 0d 0a 09 09 53 65 | 6e 64 53 74 72 69 6e 67 | {....Se|ndString|
|00001740| 20 3d 20 53 65 6e 64 53 | 74 72 69 6e 67 24 22 5c | = SendS|tring$"\|
|00001750| 5c 66 69 6e 61 6c 5c 5c | 22 3b 0d 0a 09 7d 0d 0a |\final\\|";...}..|
|00001760| 09 53 65 6e 64 53 74 72 | 69 6e 67 20 3d 20 53 65 |.SendStr|ing = Se|
|00001770| 6e 64 53 74 72 69 6e 67 | 24 22 5c 5c 71 75 65 72 |ndString|$"\\quer|
|00001780| 79 69 64 5c 5c 22 24 51 | 75 65 72 79 4e 75 6d 24 |yid\\"$Q|ueryNum$|
|00001790| 22 2e 22 24 50 61 63 6b | 65 74 4e 75 6d 3b 0d 0a |"."$Pack|etNum;..|
|000017a0| 0d 0a 09 52 65 73 75 6c | 74 20 3d 20 53 65 6e 64 |...Resul|t = Send|
|000017b0| 54 65 78 74 28 41 64 64 | 72 2c 20 53 65 6e 64 53 |Text(Add|r, SendS|
|000017c0| 74 72 69 6e 67 29 3b 0d | 0a 0d 0a 09 72 65 74 75 |tring);.|....retu|
|000017d0| 72 6e 20 52 65 73 75 6c | 74 3b 0d 0a 7d 0d 0a 0d |rn Resul|t;..}...|
|000017e0| 0a 2f 2f 20 52 65 74 75 | 72 6e 20 61 20 73 74 72 |.// Retu|rn a str|
|000017f0| 69 6e 67 20 6f 66 20 62 | 61 73 69 63 20 69 6e 66 |ing of b|asic inf|
|00001800| 6f 72 6d 61 74 69 6f 6e | 2e 0d 0a 66 75 6e 63 74 |ormation|...funct|
|00001810| 69 6f 6e 20 73 74 72 69 | 6e 67 20 47 65 74 42 61 |ion stri|ng GetBa|
|00001820| 73 69 63 28 29 20 7b 0d | 0a 09 6c 6f 63 61 6c 20 |sic() {.|..local |
|00001830| 73 74 72 69 6e 67 20 52 | 65 73 75 6c 74 53 65 74 |string R|esultSet|
|00001840| 3b 0d 0a 0d 0a 09 2f 2f | 20 54 68 65 20 6e 61 6d |;.....//| The nam|
|00001850| 65 20 6f 66 20 74 68 69 | 73 20 67 61 6d 65 2e 0d |e of thi|s game..|
|00001860| 0a 09 52 65 73 75 6c 74 | 53 65 74 20 3d 20 22 5c |..Result|Set = "\|
|00001870| 5c 67 61 6d 65 6e 61 6d | 65 5c 5c 22 24 47 61 6d |\gamenam|e\\"$Gam|
|00001880| 65 4e 61 6d 65 3b 0d 0a | 0d 0a 09 2f 2f 20 54 68 |eName;..|...// Th|
|00001890| 65 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 68 69 |e versio|n of thi|
|000018a0| 73 20 67 61 6d 65 2e 0d | 0a 09 52 65 73 75 6c 74 |s game..|..Result|
|000018b0| 53 65 74 20 3d 20 52 65 | 73 75 6c 74 53 65 74 24 |Set = Re|sultSet$|
|000018c0| 22 5c 5c 67 61 6d 65 76 | 65 72 5c 5c 22 24 4c 65 |"\\gamev|er\\"$Le|
|000018d0| 76 65 6c 2e 45 6e 67 69 | 6e 65 56 65 72 73 69 6f |vel.Engi|neVersio|
|000018e0| 6e 3b 0d 0a 0d 0a 09 2f | 2f 20 54 68 65 20 6d 6f |n;...../|/ The mo|
|000018f0| 73 74 20 72 65 63 65 6e | 74 20 6e 65 74 77 6f 72 |st recen|t networ|
|00001900| 6b 20 63 6f 6d 70 61 74 | 69 62 6c 65 20 76 65 72 |k compat|ible ver|
|00001910| 73 69 6f 6e 2e 0d 0a 09 | 52 65 73 75 6c 74 53 65 |sion....|ResultSe|
|00001920| 74 20 3d 20 52 65 73 75 | 6c 74 53 65 74 24 22 5c |t = Resu|ltSet$"\|
|00001930| 5c 6d 69 6e 6e 65 74 76 | 65 72 5c 5c 22 24 4c 65 |\minnetv|er\\"$Le|
|00001940| 76 65 6c 2e 4d 69 6e 4e | 65 74 56 65 72 73 69 6f |vel.MinN|etVersio|
|00001950| 6e 3b 0d 0a 0d 0a 09 2f | 2f 20 54 68 65 20 72 65 |n;...../|/ The re|
|00001960| 67 69 6f 6e 61 6c 20 6c | 6f 63 61 74 69 6f 6e 20 |gional l|ocation |
|00001970| 6f 66 20 74 68 69 73 20 | 67 61 6d 65 2e 0d 0a 09 |of this |game....|
|00001980| 52 65 73 75 6c 74 53 65 | 74 20 3d 20 52 65 73 75 |ResultSe|t = Resu|
|00001990| 6c 74 53 65 74 24 22 5c | 5c 6c 6f 63 61 74 69 6f |ltSet$"\|\locatio|
|000019a0| 6e 5c 5c 22 24 4c 65 76 | 65 6c 2e 47 61 6d 65 2e |n\\"$Lev|el.Game.|
|000019b0| 47 61 6d 65 52 65 70 6c | 69 63 61 74 69 6f 6e 49 |GameRepl|icationI|
|000019c0| 6e 66 6f 2e 52 65 67 69 | 6f 6e 3b 0d 0a 09 0d 0a |nfo.Regi|on;.....|
|000019d0| 09 72 65 74 75 72 6e 20 | 52 65 73 75 6c 74 53 65 |.return |ResultSe|
|000019e0| 74 3b 0d 0a 7d 0d 0a 0d | 0a 2f 2f 20 52 65 74 75 |t;..}...|.// Retu|
|000019f0| 72 6e 20 61 20 73 74 72 | 69 6e 67 20 6f 66 20 69 |rn a str|ing of i|
|00001a00| 6d 70 6f 72 74 61 6e 74 | 20 73 79 73 74 65 6d 20 |mportant| system |
|00001a10| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2e 0d 0a 66 75 |informat|ion...fu|
|00001a20| 6e 63 74 69 6f 6e 20 73 | 74 72 69 6e 67 20 47 65 |nction s|tring Ge|
|00001a30| 74 49 6e 66 6f 28 29 20 | 7b 0d 0a 09 6c 6f 63 61 |tInfo() |{...loca|
|00001a40| 6c 20 73 74 72 69 6e 67 | 20 52 65 73 75 6c 74 53 |l string| ResultS|
|00001a50| 65 74 3b 0d 0a 0d 0a 09 | 2f 2f 20 54 68 65 20 73 |et;.....|// The s|
|00001a60| 65 72 76 65 72 20 6e 61 | 6d 65 2c 20 69 2e 65 2e |erver na|me, i.e.|
|00001a70| 3a 20 42 6f 62 92 73 20 | 53 65 72 76 65 72 0d 0a |: Bob.s |Server..|
|00001a80| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 22 5c 5c |.ResultS|et = "\\|
|00001a90| 68 6f 73 74 6e 61 6d 65 | 5c 5c 22 24 4c 65 76 65 |hostname|\\"$Leve|
|00001aa0| 6c 2e 47 61 6d 65 2e 47 | 61 6d 65 52 65 70 6c 69 |l.Game.G|ameRepli|
|00001ab0| 63 61 74 69 6f 6e 49 6e | 66 6f 2e 53 65 72 76 65 |cationIn|fo.Serve|
|00001ac0| 72 4e 61 6d 65 3b 0d 0a | 0d 0a 09 2f 2f 20 54 68 |rName;..|...// Th|
|00001ad0| 65 20 73 68 6f 72 74 20 | 73 65 72 76 65 72 20 6e |e short |server n|
|00001ae0| 61 6d 65 0d 0a 09 52 65 | 73 75 6c 74 53 65 74 20 |ame...Re|sultSet |
|00001af0| 3d 20 52 65 73 75 6c 74 | 53 65 74 24 22 5c 5c 73 |= Result|Set$"\\s|
|00001b00| 68 6f 72 74 6e 61 6d 65 | 5c 5c 22 24 4c 65 76 65 |hortname|\\"$Leve|
|00001b10| 6c 2e 47 61 6d 65 2e 47 | 61 6d 65 52 65 70 6c 69 |l.Game.G|ameRepli|
|00001b20| 63 61 74 69 6f 6e 49 6e | 66 6f 2e 53 68 6f 72 74 |cationIn|fo.Short|
|00001b30| 4e 61 6d 65 3b 0d 0a 0d | 0a 09 2f 2f 20 54 68 65 |Name;...|..// The|
|00001b40| 20 73 65 72 76 65 72 20 | 70 6f 72 74 2e 0d 0a 09 | server |port....|
|00001b50| 52 65 73 75 6c 74 53 65 | 74 20 3d 20 52 65 73 75 |ResultSe|t = Resu|
|00001b60| 6c 74 53 65 74 24 22 5c | 5c 68 6f 73 74 70 6f 72 |ltSet$"\|\hostpor|
|00001b70| 74 5c 5c 22 24 4c 65 76 | 65 6c 2e 47 61 6d 65 2e |t\\"$Lev|el.Game.|
|00001b80| 47 65 74 53 65 72 76 65 | 72 50 6f 72 74 28 29 3b |GetServe|rPort();|
|00001b90| 0d 0a 0d 0a 09 2f 2f 20 | 28 6f 70 74 69 6f 6e 61 |.....// |(optiona|
|00001ba0| 6c 29 20 54 68 65 20 73 | 65 72 76 65 72 20 49 50 |l) The s|erver IP|
|00001bb0| 0d 0a 09 2f 2f 20 69 66 | 20 28 53 65 72 76 65 72 |...// if| (Server|
|00001bc0| 49 50 20 21 3d 20 22 22 | 29 0d 0a 09 2f 2f 09 52 |IP != ""|)...//.R|
|00001bd0| 65 73 75 6c 74 53 65 74 | 20 3d 20 52 65 73 75 6c |esultSet| = Resul|
|00001be0| 74 53 65 74 24 22 5c 5c | 68 6f 73 74 69 70 5c 5c |tSet$"\\|hostip\\|
|00001bf0| 22 24 53 65 72 76 65 72 | 49 50 3b 0d 0a 0d 0a 09 |"$Server|IP;.....|
|00001c00| 2f 2f 20 54 68 65 20 6d | 61 70 2f 6c 65 76 65 6c |// The m|ap/level|
|00001c10| 20 74 69 74 6c 65 0d 0a | 09 52 65 73 75 6c 74 53 | title..|.ResultS|
|00001c20| 65 74 20 3d 20 52 65 73 | 75 6c 74 53 65 74 24 22 |et = Res|ultSet$"|
|00001c30| 5c 5c 6d 61 70 74 69 74 | 6c 65 5c 5c 22 24 4c 65 |\\maptit|le\\"$Le|
|00001c40| 76 65 6c 2e 54 69 74 6c | 65 3b 0d 0a 09 0d 0a 09 |vel.Titl|e;......|
|00001c50| 2f 2f 20 4d 61 70 20 6e | 61 6d 65 0d 0a 09 52 65 |// Map n|ame...Re|
|00001c60| 73 75 6c 74 53 65 74 20 | 3d 20 52 65 73 75 6c 74 |sultSet |= Result|
|00001c70| 53 65 74 24 22 5c 5c 6d | 61 70 6e 61 6d 65 5c 5c |Set$"\\m|apname\\|
|00001c80| 22 24 4c 65 66 74 28 73 | 74 72 69 6e 67 28 4c 65 |"$Left(s|tring(Le|
|00001c90| 76 65 6c 29 2c 20 49 6e | 53 74 72 28 73 74 72 69 |vel), In|Str(stri|
|00001ca0| 6e 67 28 4c 65 76 65 6c | 29 2c 20 22 2e 22 29 29 |ng(Level|), "."))|
|00001cb0| 3b 0d 0a 0d 0a 09 2f 2f | 20 54 68 65 20 6d 6f 64 |;.....//| The mod|
|00001cc0| 20 6f 72 20 67 61 6d 65 | 20 74 79 70 65 0d 0a 09 | or game| type...|
|00001cd0| 52 65 73 75 6c 74 53 65 | 74 20 3d 20 52 65 73 75 |ResultSe|t = Resu|
|00001ce0| 6c 74 53 65 74 24 22 5c | 5c 67 61 6d 65 74 79 70 |ltSet$"\|\gametyp|
|00001cf0| 65 5c 5c 22 24 47 65 74 | 49 74 65 6d 4e 61 6d 65 |e\\"$Get|ItemName|
|00001d00| 28 73 74 72 69 6e 67 28 | 4c 65 76 65 6c 2e 47 61 |(string(|Level.Ga|
|00001d10| 6d 65 2e 43 6c 61 73 73 | 29 29 3b 0d 0a 0d 0a 09 |me.Class|));.....|
|00001d20| 2f 2f 20 54 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |// The n|umber of|
|00001d30| 20 70 6c 61 79 65 72 73 | 0d 0a 09 52 65 73 75 6c | players|...Resul|
|00001d40| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|00001d50| 24 22 5c 5c 6e 75 6d 70 | 6c 61 79 65 72 73 5c 5c |$"\\nump|layers\\|
|00001d60| 22 24 4c 65 76 65 6c 2e | 47 61 6d 65 2e 4e 75 6d |"$Level.|Game.Num|
|00001d70| 50 6c 61 79 65 72 73 3b | 0d 0a 0d 0a 09 2f 2f 20 |Players;|.....// |
|00001d80| 54 68 65 20 6d 61 78 69 | 6d 75 6d 20 6e 75 6d 62 |The maxi|mum numb|
|00001d90| 65 72 20 6f 66 20 70 6c | 61 79 65 72 73 0d 0a 09 |er of pl|ayers...|
|00001da0| 52 65 73 75 6c 74 53 65 | 74 20 3d 20 52 65 73 75 |ResultSe|t = Resu|
|00001db0| 6c 74 53 65 74 24 22 5c | 5c 6d 61 78 70 6c 61 79 |ltSet$"\|\maxplay|
|00001dc0| 65 72 73 5c 5c 22 24 4c | 65 76 65 6c 2e 47 61 6d |ers\\"$L|evel.Gam|
|00001dd0| 65 2e 4d 61 78 50 6c 61 | 79 65 72 73 3b 0d 0a 0d |e.MaxPla|yers;...|
|00001de0| 0a 09 2f 2f 20 54 68 65 | 20 67 61 6d 65 20 6d 6f |..// The| game mo|
|00001df0| 64 65 3a 20 6f 70 65 6e | 70 6c 61 79 69 6e 67 0d |de: open|playing.|
|00001e00| 0a 09 52 65 73 75 6c 74 | 53 65 74 20 3d 20 52 65 |..Result|Set = Re|
|00001e10| 73 75 6c 74 53 65 74 24 | 22 5c 5c 67 61 6d 65 6d |sultSet$|"\\gamem|
|00001e20| 6f 64 65 5c 5c 6f 70 65 | 6e 70 6c 61 79 69 6e 67 |ode\\ope|nplaying|
|00001e30| 22 3b 0d 0a 0d 0a 09 2f | 2f 20 54 68 65 20 76 65 |";...../|/ The ve|
|00001e40| 72 73 69 6f 6e 20 6f 66 | 20 74 68 69 73 20 67 61 |rsion of| this ga|
|00001e50| 6d 65 2e 0d 0a 09 52 65 | 73 75 6c 74 53 65 74 20 |me....Re|sultSet |
|00001e60| 3d 20 52 65 73 75 6c 74 | 53 65 74 24 22 5c 5c 67 |= Result|Set$"\\g|
|00001e70| 61 6d 65 76 65 72 5c 5c | 22 24 4c 65 76 65 6c 2e |amever\\|"$Level.|
|00001e80| 45 6e 67 69 6e 65 56 65 | 72 73 69 6f 6e 3b 0d 0a |EngineVe|rsion;..|
|00001e90| 0d 0a 09 2f 2f 20 54 68 | 65 20 6d 6f 73 74 20 72 |...// Th|e most r|
|00001ea0| 65 63 65 6e 74 20 6e 65 | 74 77 6f 72 6b 20 63 6f |ecent ne|twork co|
|00001eb0| 6d 70 61 74 69 62 6c 65 | 20 76 65 72 73 69 6f 6e |mpatible| version|
|00001ec0| 2e 0d 0a 09 52 65 73 75 | 6c 74 53 65 74 20 3d 20 |....Resu|ltSet = |
|00001ed0| 52 65 73 75 6c 74 53 65 | 74 24 22 5c 5c 6d 69 6e |ResultSe|t$"\\min|
|00001ee0| 6e 65 74 76 65 72 5c 5c | 22 24 4c 65 76 65 6c 2e |netver\\|"$Level.|
|00001ef0| 4d 69 6e 4e 65 74 56 65 | 72 73 69 6f 6e 3b 0d 0a |MinNetVe|rsion;..|
|00001f00| 0d 0a 09 52 65 73 75 6c | 74 53 65 74 20 3d 20 52 |...Resul|tSet = R|
|00001f10| 65 73 75 6c 74 53 65 74 | 24 4c 65 76 65 6c 2e 47 |esultSet|$Level.G|
|00001f20| 61 6d 65 2e 47 65 74 49 | 6e 66 6f 28 29 3b 0d 0a |ame.GetI|nfo();..|
|00001f30| 0d 0a 09 72 65 74 75 72 | 6e 20 52 65 73 75 6c 74 |...retur|n Result|
|00001f40| 53 65 74 3b 0d 0a 7d 0d | 0a 0d 0a 2f 2f 20 52 65 |Set;..}.|...// Re|
|00001f50| 74 75 72 6e 20 61 20 73 | 74 72 69 6e 67 20 6f 66 |turn a s|tring of|
|00001f60| 20 6d 69 73 63 65 6c 6c | 61 6e 65 6f 75 73 20 69 | miscell|aneous i|
|00001f70| 6e 66 6f 72 6d 61 74 69 | 6f 6e 2e 0d 0a 2f 2f 20 |nformati|on...// |
|00001f80| 47 61 6d 65 20 73 70 65 | 63 69 66 69 63 20 69 6e |Game spe|cific in|
|00001f90| 66 6f 72 6d 61 74 69 6f | 6e 2c 20 75 73 65 72 20 |formatio|n, user |
|00001fa0| 64 65 66 69 6e 65 64 20 | 64 61 74 61 2c 20 63 75 |defined |data, cu|
|00001fb0| 73 74 6f 6d 20 70 61 72 | 61 6d 65 74 65 72 73 20 |stom par|ameters |
|00001fc0| 66 6f 72 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |for the |command |
|00001fd0| 6c 69 6e 65 2e 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |line...f|unction |
|00001fe0| 73 74 72 69 6e 67 20 47 | 65 74 52 75 6c 65 73 28 |string G|etRules(|
|00001ff0| 29 0d 0a 7b 0d 0a 09 6c | 6f 63 61 6c 20 73 74 72 |)..{...l|ocal str|
|00002000| 69 6e 67 20 52 65 73 75 | 6c 74 53 65 74 3b 0d 0a |ing Resu|ltSet;..|
|00002010| 0d 0a 09 52 65 73 75 6c | 74 53 65 74 20 3d 20 4c |...Resul|tSet = L|
|00002020| 65 76 65 6c 2e 47 61 6d | 65 2e 47 65 74 52 75 6c |evel.Gam|e.GetRul|
|00002030| 65 73 28 29 3b 0d 0a 0d | 0a 09 2f 2f 20 41 64 6d |es();...|..// Adm|
|00002040| 69 6e 27 73 20 4e 61 6d | 65 0d 0a 09 69 66 28 20 |in's Nam|e...if( |
|00002050| 4c 65 76 65 6c 2e 47 61 | 6d 65 2e 47 61 6d 65 52 |Level.Ga|me.GameR|
|00002060| 65 70 6c 69 63 61 74 69 | 6f 6e 49 6e 66 6f 2e 41 |eplicati|onInfo.A|
|00002070| 64 6d 69 6e 4e 61 6d 65 | 20 21 3d 20 22 22 20 29 |dminName| != "" )|
|00002080| 0d 0a 09 09 52 65 73 75 | 6c 74 53 65 74 20 3d 20 |....Resu|ltSet = |
|00002090| 52 65 73 75 6c 74 53 65 | 74 24 22 5c 5c 41 64 6d |ResultSe|t$"\\Adm|
|000020a0| 69 6e 4e 61 6d 65 5c 5c | 22 24 4c 65 76 65 6c 2e |inName\\|"$Level.|
|000020b0| 47 61 6d 65 2e 47 61 6d | 65 52 65 70 6c 69 63 61 |Game.Gam|eReplica|
|000020c0| 74 69 6f 6e 49 6e 66 6f | 2e 41 64 6d 69 6e 4e 61 |tionInfo|.AdminNa|
|000020d0| 6d 65 3b 0d 0a 09 0d 0a | 09 2f 2f 20 41 64 6d 69 |me;.....|.// Admi|
|000020e0| 6e 27 73 20 45 6d 61 69 | 6c 0d 0a 09 69 66 28 20 |n's Emai|l...if( |
|000020f0| 4c 65 76 65 6c 2e 47 61 | 6d 65 2e 47 61 6d 65 52 |Level.Ga|me.GameR|
|00002100| 65 70 6c 69 63 61 74 69 | 6f 6e 49 6e 66 6f 2e 41 |eplicati|onInfo.A|
|00002110| 64 6d 69 6e 45 6d 61 69 | 6c 20 21 3d 20 22 22 20 |dminEmai|l != "" |
|00002120| 29 0d 0a 09 09 52 65 73 | 75 6c 74 53 65 74 20 3d |)....Res|ultSet =|
|00002130| 20 52 65 73 75 6c 74 53 | 65 74 24 22 5c 5c 41 64 | ResultS|et$"\\Ad|
|00002140| 6d 69 6e 45 4d 61 69 6c | 5c 5c 22 24 4c 65 76 65 |minEMail|\\"$Leve|
|00002150| 6c 2e 47 61 6d 65 2e 47 | 61 6d 65 52 65 70 6c 69 |l.Game.G|ameRepli|
|00002160| 63 61 74 69 6f 6e 49 6e | 66 6f 2e 41 64 6d 69 6e |cationIn|fo.Admin|
|00002170| 45 6d 61 69 6c 3b 0d 0a | 0d 0a 09 72 65 74 75 72 |Email;..|...retur|
|00002180| 6e 20 52 65 73 75 6c 74 | 53 65 74 3b 0d 0a 7d 0d |n Result|Set;..}.|
|00002190| 0a 0d 0a 2f 2f 20 52 65 | 74 75 72 6e 20 61 20 73 |...// Re|turn a s|
|000021a0| 74 72 69 6e 67 20 6f 66 | 20 69 6e 66 6f 72 6d 61 |tring of| informa|
|000021b0| 74 69 6f 6e 20 6f 6e 20 | 61 20 70 6c 61 79 65 72 |tion on |a player|
|000021c0| 2e 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 73 74 72 69 |...funct|ion stri|
|000021d0| 6e 67 20 47 65 74 50 6c | 61 79 65 72 28 20 50 6c |ng GetPl|ayer( Pl|
|000021e0| 61 79 65 72 50 61 77 6e | 20 50 2c 20 69 6e 74 20 |ayerPawn| P, int |
|000021f0| 50 6c 61 79 65 72 4e 75 | 6d 20 29 0d 0a 7b 0d 0a |PlayerNu|m )..{..|
|00002200| 09 6c 6f 63 61 6c 20 73 | 74 72 69 6e 67 20 52 65 |.local s|tring Re|
|00002210| 73 75 6c 74 53 65 74 3b | 0d 0a 09 6c 6f 63 61 6c |sultSet;|...local|
|00002220| 20 73 74 72 69 6e 67 20 | 53 6b 69 6e 4e 61 6d 65 | string |SkinName|
|00002230| 2c 20 46 61 63 65 4e 61 | 6d 65 3b 0d 0a 0d 0a 09 |, FaceNa|me;.....|
|00002240| 2f 2f 20 4e 61 6d 65 0d | 0a 09 52 65 73 75 6c 74 |// Name.|..Result|
|00002250| 53 65 74 20 3d 20 22 5c | 5c 70 6c 61 79 65 72 5f |Set = "\|\player_|
|00002260| 22 24 50 6c 61 79 65 72 | 4e 75 6d 24 22 5c 5c 22 |"$Player|Num$"\\"|
|00002270| 24 50 2e 50 6c 61 79 65 | 72 52 65 70 6c 69 63 61 |$P.Playe|rReplica|
|00002280| 74 69 6f 6e 49 6e 66 6f | 2e 50 6c 61 79 65 72 4e |tionInfo|.PlayerN|
|00002290| 61 6d 65 3b 0d 0a 0d 0a | 09 2f 2f 20 46 72 61 67 |ame;....|.// Frag|
|000022a0| 73 0d 0a 09 52 65 73 75 | 6c 74 53 65 74 20 3d 20 |s...Resu|ltSet = |
|000022b0| 52 65 73 75 6c 74 53 65 | 74 24 22 5c 5c 66 72 61 |ResultSe|t$"\\fra|
|000022c0| 67 73 5f 22 24 50 6c 61 | 79 65 72 4e 75 6d 24 22 |gs_"$Pla|yerNum$"|
|000022d0| 5c 5c 22 24 69 6e 74 28 | 50 2e 50 6c 61 79 65 72 |\\"$int(|P.Player|
|000022e0| 52 65 70 6c 69 63 61 74 | 69 6f 6e 49 6e 66 6f 2e |Replicat|ionInfo.|
|000022f0| 53 63 6f 72 65 29 3b 0d | 0a 0d 0a 09 2f 2f 20 50 |Score);.|....// P|
|00002300| 69 6e 67 0d 0a 09 52 65 | 73 75 6c 74 53 65 74 20 |ing...Re|sultSet |
|00002310| 3d 20 52 65 73 75 6c 74 | 53 65 74 24 22 5c 5c 70 |= Result|Set$"\\p|
|00002320| 69 6e 67 5f 22 24 50 6c | 61 79 65 72 4e 75 6d 24 |ing_"$Pl|ayerNum$|
|00002330| 22 5c 5c 22 24 50 2e 43 | 6f 6e 73 6f 6c 65 43 6f |"\\"$P.C|onsoleCo|
|00002340| 6d 6d 61 6e 64 28 22 47 | 45 54 50 49 4e 47 22 29 |mmand("G|ETPING")|
|00002350| 3b 0d 0a 0d 0a 09 2f 2f | 20 54 65 61 6d 0d 0a 09 |;.....//| Team...|
|00002360| 52 65 73 75 6c 74 53 65 | 74 20 3d 20 52 65 73 75 |ResultSe|t = Resu|
|00002370| 6c 74 53 65 74 24 22 5c | 5c 74 65 61 6d 5f 22 24 |ltSet$"\|\team_"$|
|00002380| 50 6c 61 79 65 72 4e 75 | 6d 24 22 5c 5c 22 24 50 |PlayerNu|m$"\\"$P|
|00002390| 2e 50 6c 61 79 65 72 52 | 65 70 6c 69 63 61 74 69 |.PlayerR|eplicati|
|000023a0| 6f 6e 49 6e 66 6f 2e 54 | 65 61 6d 3b 0d 0a 0d 0a |onInfo.T|eam;....|
|000023b0| 09 2f 2f 20 43 6c 61 73 | 73 0d 0a 09 52 65 73 75 |.// Clas|s...Resu|
|000023c0| 6c 74 53 65 74 20 3d 20 | 52 65 73 75 6c 74 53 65 |ltSet = |ResultSe|
|000023d0| 74 24 22 5c 5c 6d 65 73 | 68 5f 22 24 50 6c 61 79 |t$"\\mes|h_"$Play|
|000023e0| 65 72 4e 75 6d 24 22 5c | 5c 22 24 50 2e 4d 65 6e |erNum$"\|\"$P.Men|
|000023f0| 75 6e 61 6d 65 3b 0d 0a | 0d 0a 09 2f 2f 20 53 6b |uname;..|...// Sk|
|00002400| 69 6e 0d 0a 09 69 66 28 | 50 2e 53 6b 69 6e 20 3d |in...if(|P.Skin =|
|00002410| 3d 20 4e 6f 6e 65 29 0d | 0a 09 7b 0d 0a 09 09 50 |= None).|..{....P|
|00002420| 2e 73 74 61 74 69 63 2e | 47 65 74 4d 75 6c 74 69 |.static.|GetMulti|
|00002430| 53 6b 69 6e 28 50 2c 20 | 53 6b 69 6e 4e 61 6d 65 |Skin(P, |SkinName|
|00002440| 2c 20 46 61 63 65 4e 61 | 6d 65 29 3b 0d 0a 09 09 |, FaceNa|me);....|
|00002450| 52 65 73 75 6c 74 53 65 | 74 20 3d 20 52 65 73 75 |ResultSe|t = Resu|
|00002460| 6c 74 53 65 74 24 22 5c | 5c 73 6b 69 6e 5f 22 24 |ltSet$"\|\skin_"$|
|00002470| 50 6c 61 79 65 72 4e 75 | 6d 24 22 5c 5c 22 24 53 |PlayerNu|m$"\\"$S|
|00002480| 6b 69 6e 4e 61 6d 65 3b | 0d 0a 09 09 52 65 73 75 |kinName;|....Resu|
|00002490| 6c 74 53 65 74 20 3d 20 | 52 65 73 75 6c 74 53 65 |ltSet = |ResultSe|
|000024a0| 74 24 22 5c 5c 66 61 63 | 65 5f 22 24 50 6c 61 79 |t$"\\fac|e_"$Play|
|000024b0| 65 72 4e 75 6d 24 22 5c | 5c 22 24 46 61 63 65 4e |erNum$"\|\"$FaceN|
|000024c0| 61 6d 65 3b 0d 0a 09 7d | 0d 0a 09 65 6c 73 65 0d |ame;...}|...else.|
|000024d0| 0a 09 7b 0d 0a 09 09 52 | 65 73 75 6c 74 53 65 74 |..{....R|esultSet|
|000024e0| 20 3d 20 52 65 73 75 6c | 74 53 65 74 24 22 5c 5c | = Resul|tSet$"\\|
|000024f0| 73 6b 69 6e 5f 22 24 50 | 6c 61 79 65 72 4e 75 6d |skin_"$P|layerNum|
|00002500| 24 22 5c 5c 22 24 73 74 | 72 69 6e 67 28 50 2e 53 |$"\\"$st|ring(P.S|
|00002510| 6b 69 6e 29 3b 0d 0a 09 | 09 52 65 73 75 6c 74 53 |kin);...|.ResultS|
|00002520| 65 74 20 3d 20 52 65 73 | 75 6c 74 53 65 74 24 22 |et = Res|ultSet$"|
|00002530| 5c 5c 66 61 63 65 5f 22 | 24 50 6c 61 79 65 72 4e |\\face_"|$PlayerN|
|00002540| 75 6d 24 22 5c 5c 4e 6f | 6e 65 22 3b 0d 0a 09 7d |um$"\\No|ne";...}|
|00002550| 0d 0a 0d 0a 09 72 65 74 | 75 72 6e 20 52 65 73 75 |.....ret|urn Resu|
|00002560| 6c 74 53 65 74 3b 0d 0a | 7d 0d 0a 0d 0a 2f 2f 20 |ltSet;..|}....// |
|00002570| 53 65 6e 64 20 64 61 74 | 61 20 66 6f 72 20 65 61 |Send dat|a for ea|
|00002580| 63 68 20 70 6c 61 79 65 | 72 0d 0a 66 75 6e 63 74 |ch playe|r..funct|
|00002590| 69 6f 6e 20 62 6f 6f 6c | 20 53 65 6e 64 50 6c 61 |ion bool| SendPla|
|000025a0| 79 65 72 73 28 49 70 41 | 64 64 72 20 41 64 64 72 |yers(IpA|ddr Addr|
|000025b0| 2c 20 69 6e 74 20 51 75 | 65 72 79 4e 75 6d 2c 20 |, int Qu|eryNum, |
|000025c0| 6f 75 74 20 69 6e 74 20 | 50 61 63 6b 65 74 4e 75 |out int |PacketNu|
|000025d0| 6d 2c 20 73 74 72 69 6e | 67 20 46 69 6e 61 6c 50 |m, strin|g FinalP|
|000025e0| 61 63 6b 65 74 29 0d 0a | 7b 0d 0a 09 6c 6f 63 61 |acket)..|{...loca|
|000025f0| 6c 20 50 61 77 6e 20 50 | 3b 0d 0a 09 6c 6f 63 61 |l Pawn P|;...loca|
|00002600| 6c 20 69 6e 74 20 69 3b | 0d 0a 09 6c 6f 63 61 6c |l int i;|...local|
|00002610| 20 62 6f 6f 6c 20 52 65 | 73 75 6c 74 2c 20 53 65 | bool Re|sult, Se|
|00002620| 6e 64 52 65 73 75 6c 74 | 3b 0d 0a 09 0d 0a 09 52 |ndResult|;......R|
|00002630| 65 73 75 6c 74 20 3d 20 | 66 61 6c 73 65 3b 0d 0a |esult = |false;..|
|00002640| 0d 0a 09 50 20 3d 20 4c | 65 76 65 6c 2e 50 61 77 |...P = L|evel.Paw|
|00002650| 6e 4c 69 73 74 3b 0d 0a | 09 77 68 69 6c 65 28 20 |nList;..|.while( |
|00002660| 69 20 3c 20 4c 65 76 65 | 6c 2e 47 61 6d 65 2e 4e |i < Leve|l.Game.N|
|00002670| 75 6d 50 6c 61 79 65 72 | 73 20 29 0d 0a 09 7b 0d |umPlayer|s )...{.|
|00002680| 0a 09 09 69 66 20 28 50 | 2e 49 73 41 28 27 50 6c |...if (P|.IsA('Pl|
|00002690| 61 79 65 72 50 61 77 6e | 27 29 29 0d 0a 09 09 7b |ayerPawn|'))....{|
|000026a0| 0d 0a 09 09 09 69 66 28 | 20 69 3d 3d 4c 65 76 65 |.....if(| i==Leve|
|000026b0| 6c 2e 47 61 6d 65 2e 4e | 75 6d 50 6c 61 79 65 72 |l.Game.N|umPlayer|
|000026c0| 73 2d 31 20 26 26 20 46 | 69 6e 61 6c 50 61 63 6b |s-1 && F|inalPack|
|000026d0| 65 74 3d 3d 22 66 69 6e | 61 6c 22 20 29 0d 0a 09 |et=="fin|al" )...|
|000026e0| 09 09 09 53 65 6e 64 52 | 65 73 75 6c 74 20 3d 20 |...SendR|esult = |
|000026f0| 53 65 6e 64 51 75 65 72 | 79 50 61 63 6b 65 74 28 |SendQuer|yPacket(|
|00002700| 41 64 64 72 2c 20 47 65 | 74 50 6c 61 79 65 72 28 |Addr, Ge|tPlayer(|
|00002710| 50 6c 61 79 65 72 50 61 | 77 6e 28 50 29 2c 20 69 |PlayerPa|wn(P), i|
|00002720| 29 2c 20 51 75 65 72 79 | 4e 75 6d 2c 20 2b 2b 50 |), Query|Num, ++P|
|00002730| 61 63 6b 65 74 4e 75 6d | 2c 20 22 66 69 6e 61 6c |acketNum|, "final|
|00002740| 22 29 3b 0d 0a 09 09 09 | 65 6c 73 65 0d 0a 09 09 |");.....|else....|
|00002750| 09 09 53 65 6e 64 52 65 | 73 75 6c 74 20 3d 20 53 |..SendRe|sult = S|
|00002760| 65 6e 64 51 75 65 72 79 | 50 61 63 6b 65 74 28 41 |endQuery|Packet(A|
|00002770| 64 64 72 2c 20 47 65 74 | 50 6c 61 79 65 72 28 50 |ddr, Get|Player(P|
|00002780| 6c 61 79 65 72 50 61 77 | 6e 28 50 29 2c 20 69 29 |layerPaw|n(P), i)|
|00002790| 2c 20 51 75 65 72 79 4e | 75 6d 2c 20 2b 2b 50 61 |, QueryN|um, ++Pa|
|000027a0| 63 6b 65 74 4e 75 6d 2c | 20 22 22 29 3b 0d 0a 09 |cketNum,| "");...|
|000027b0| 09 09 52 65 73 75 6c 74 | 20 3d 20 53 65 6e 64 52 |..Result| = SendR|
|000027c0| 65 73 75 6c 74 20 7c 7c | 20 52 65 73 75 6c 74 3b |esult ||| Result;|
|000027d0| 0d 0a 09 09 09 69 2b 2b | 3b 0d 0a 09 09 7d 0d 0a |.....i++|;....}..|
|000027e0| 09 09 50 20 3d 20 50 2e | 6e 65 78 74 50 61 77 6e |..P = P.|nextPawn|
|000027f0| 3b 0d 0a 09 7d 0d 0a 0d | 0a 09 72 65 74 75 72 6e |;...}...|..return|
|00002800| 20 52 65 73 75 6c 74 3b | 0d 0a 7d 0d 0a 0d 0a 2f | Result;|..}..../|
|00002810| 2f 20 47 65 74 20 61 6e | 20 61 72 62 69 74 72 61 |/ Get an| arbitra|
|00002820| 72 79 20 70 72 6f 70 65 | 72 74 79 20 66 72 6f 6d |ry prope|rty from|
|00002830| 20 74 68 65 20 6c 65 76 | 65 6c 20 6f 62 6a 65 63 | the lev|el objec|
|00002840| 74 2e 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 73 74 72 |t...func|tion str|
|00002850| 69 6e 67 20 47 65 74 4c | 65 76 65 6c 50 72 6f 70 |ing GetL|evelProp|
|00002860| 65 72 74 79 28 20 73 74 | 72 69 6e 67 20 50 72 6f |erty( st|ring Pro|
|00002870| 70 20 29 0d 0a 7b 0d 0a | 09 6c 6f 63 61 6c 20 73 |p )..{..|.local s|
|00002880| 74 72 69 6e 67 20 52 65 | 73 75 6c 74 53 65 74 3b |tring Re|sultSet;|
|00002890| 0d 0a 09 0d 0a 09 52 65 | 73 75 6c 74 53 65 74 20 |......Re|sultSet |
|000028a0| 3d 20 22 5c 5c 22 24 50 | 72 6f 70 24 22 5c 5c 22 |= "\\"$P|rop$"\\"|
|000028b0| 24 4c 65 76 65 6c 2e 47 | 65 74 50 72 6f 70 65 72 |$Level.G|etProper|
|000028c0| 74 79 54 65 78 74 28 50 | 72 6f 70 29 3b 0d 0a 09 |tyText(P|rop);...|
|000028d0| 0d 0a 09 72 65 74 75 72 | 6e 20 52 65 73 75 6c 74 |...retur|n Result|
|000028e0| 53 65 74 3b 0d 0a 7d 0d | 0a 0d 0a 2f 2f 20 47 65 |Set;..}.|...// Ge|
|000028f0| 74 20 61 6e 20 61 72 62 | 69 74 72 61 72 79 20 70 |t an arb|itrary p|
|00002900| 72 6f 70 65 72 74 79 20 | 66 72 6f 6d 20 74 68 65 |roperty |from the|
|00002910| 20 67 61 6d 65 20 6f 62 | 6a 65 63 74 2e 0d 0a 66 | game ob|ject...f|
|00002920| 75 6e 63 74 69 6f 6e 20 | 73 74 72 69 6e 67 20 47 |unction |string G|
|00002930| 65 74 47 61 6d 65 50 72 | 6f 70 65 72 74 79 28 20 |etGamePr|operty( |
|00002940| 73 74 72 69 6e 67 20 50 | 72 6f 70 20 29 0d 0a 7b |string P|rop )..{|
|00002950| 0d 0a 09 6c 6f 63 61 6c | 20 73 74 72 69 6e 67 20 |...local| string |
|00002960| 52 65 73 75 6c 74 53 65 | 74 3b 0d 0a 0d 0a 09 52 |ResultSe|t;.....R|
|00002970| 65 73 75 6c 74 53 65 74 | 20 3d 20 22 5c 5c 22 24 |esultSet| = "\\"$|
|00002980| 50 72 6f 70 24 22 5c 5c | 22 24 4c 65 76 65 6c 2e |Prop$"\\|"$Level.|
|00002990| 47 61 6d 65 2e 47 65 74 | 50 72 6f 70 65 72 74 79 |Game.Get|Property|
|000029a0| 54 65 78 74 28 50 72 6f | 70 29 3b 0d 0a 09 0d 0a |Text(Pro|p);.....|
|000029b0| 09 72 65 74 75 72 6e 20 | 52 65 73 75 6c 74 53 65 |.return |ResultSe|
|000029c0| 74 3b 0d 0a 7d 0d 0a 0d | 0a 2f 2f 20 47 65 74 20 |t;..}...|.// Get |
|000029d0| 61 6e 20 61 72 62 69 74 | 72 61 72 79 20 70 72 6f |an arbit|rary pro|
|000029e0| 70 65 72 74 79 20 66 72 | 6f 6d 20 74 68 65 20 70 |perty fr|om the p|
|000029f0| 6c 61 79 65 72 73 2e 0d | 0a 66 75 6e 63 74 69 6f |layers..|.functio|
|00002a00| 6e 20 73 74 72 69 6e 67 | 20 47 65 74 50 6c 61 79 |n string| GetPlay|
|00002a10| 65 72 50 72 6f 70 65 72 | 74 79 28 20 73 74 72 69 |erProper|ty( stri|
|00002a20| 6e 67 20 50 72 6f 70 20 | 29 0d 0a 7b 0d 0a 09 6c |ng Prop |)..{...l|
|00002a30| 6f 63 61 6c 20 73 74 72 | 69 6e 67 20 52 65 73 75 |ocal str|ing Resu|
|00002a40| 6c 74 53 65 74 3b 0d 0a | 09 6c 6f 63 61 6c 20 69 |ltSet;..|.local i|
|00002a50| 6e 74 20 69 3b 0d 0a 09 | 6c 6f 63 61 6c 20 50 6c |nt i;...|local Pl|
|00002a60| 61 79 65 72 50 61 77 6e | 20 50 3b 0d 0a 0d 0a 09 |ayerPawn| P;.....|
|00002a70| 66 6f 72 65 61 63 68 20 | 41 6c 6c 41 63 74 6f 72 |foreach |AllActor|
|00002a80| 73 28 63 6c 61 73 73 27 | 50 6c 61 79 65 72 50 61 |s(class'|PlayerPa|
|00002a90| 77 6e 27 2c 20 50 29 20 | 7b 0d 0a 09 09 69 2b 2b |wn', P) |{....i++|
|00002aa0| 3b 0d 0a 09 09 52 65 73 | 75 6c 74 53 65 74 20 3d |;....Res|ultSet =|
|00002ab0| 20 52 65 73 75 6c 74 53 | 65 74 24 22 5c 5c 22 24 | ResultS|et$"\\"$|
|00002ac0| 50 72 6f 70 24 22 5f 22 | 24 69 24 22 5c 5c 22 24 |Prop$"_"|$i$"\\"$|
|00002ad0| 50 2e 47 65 74 50 72 6f | 70 65 72 74 79 54 65 78 |P.GetPro|pertyTex|
|00002ae0| 74 28 50 72 6f 70 29 3b | 0d 0a 09 7d 0d 0a 09 0d |t(Prop);|...}....|
|00002af0| 0a 09 72 65 74 75 72 6e | 20 52 65 73 75 6c 74 53 |..return| ResultS|
|00002b00| 65 74 3b 0d 0a 7d 0d 0a | 0d 0a 00 |et;..}..|... |
+--------+-------------------------+-------------------------+--------+--------+